// Copyright (C) 2016  Francisco Javier Parra <franparpe@openmailbox.org>


// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA

#ifndef XMPPLAR_H
#define XMPPLAR_H

#include <gtkmm.h>
#include "main-window.h"
#include <gloox/message.h>
#include <gloox/messagehandler.h>
#include <gloox/client.h>
#include <gloox/jid.h>
#include <gloox/connectionlistener.h>


class xmpplar : public Gtk::Application
{
protected:
  xmpplar();

public:
  static Glib::RefPtr<xmpplar> create();
  // virtual void handleMessage( const gloox::Message& stanza,
  //                             gloox::MessageSession* session = 0 );
  // virtual void onDisconnect 	( 	ConnectionError  	e	)
  // virtual ~xmpplar();

protected:
  void on_activate() override;


private:
  // MainWindow  m_mainWindow;
  // void on_hide_window (Gtk::ApplicationWindow *window);
  MainWindow* create_appwindow();
  void on_hide_window(Gtk::Window* window);

  // Here comes the member variables
  gloox::Client* m_client;
  MainWindow* m_mainWindow;

};


#endif
